import axios from 'axios';
import baseURL, { URLS } from './URLS';

const appkey = 'skyline_1715156428626';

const request = axios.create({
  baseURL,
  params: {
    appkey,
  },
});
request.interceptors.response.use((resp) => resp.data);

export const getSideBar = (type) => request.get(URLS.getSideBar, {
  params: { type },
});
export const getGoodsList = (type, page, size, sort) => request.get(URLS.getGoodsList, {
  params: {
    type, page, size, sort,
  },
});
